<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body>
<div class="main-content">
    <form id="form-punreward-add" class="form-horizontal" AUTOCOMPLETE="OFF">
        <input id="eid" name="eid" class="form-control" type="hidden"/>
        <h4 class="form-header h4">基本信息</h4>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">工号：</label>
                    <div class="col-sm-8">
                        <input id="badge" name="badge" placeholder="选择员工" class="form-control" type="text"
                               onclick="getEmp()" required />
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">姓名：</label>
                    <div class="col-sm-8">
                        <input id="name" name="name" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">公司名称：</label>
                    <div class="col-sm-8">
                        <input id="compName" name="compName" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">部门名称：</label>
                    <div class="col-sm-8">
                        <input id="depName" name="depName" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">岗位名称：</label>
                    <div class="col-sm-8">
                        <input id="jobName" name="jobName" class="form-control" readonly="readonly" type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">新增信息</h4>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">公司内外?</label>
                    <div class="col-sm-8">
                        <select name="InOut" id="InOut" class="form-control m-b">
                            <option value="">请选择</option>
                            <option value="0">公司外</option>
                            <option value="1">公司内</option>
                        </select></div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">惩奖形式：</label>
                    <div class="col-sm-8">
                        <select name="HortationKind" id="HortationKind" class="form-control m-b"
                                th:with="type=${@dict.getType('eCD_HortationKind')}">
                            <option value="">请选择</option>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                    th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">惩奖类别：</label>
                    <div class="col-sm-8">
                        <select name="HortationType" id="HortationType" class="form-control m-b"
                                th:with="type=${@dict.getType('eCD_HortationType')}">
                            <option value="">请选择</option>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                    th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">惩奖时间：</label>
                    <div class="col-sm-8">
                        <input id="HappenDate" name="HappenDate" class="form-control laydate-demo-1"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">实施机构：</label>
                    <div class="col-sm-8">
                        <input id="Organizer" name="Organizer" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">惩奖原因：</label>
                    <div class="col-sm-8">
                        <input id="Reason" name="Reason"  class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">惩奖时间概述：</label>
                    <div class="col-sm-8">
                        <input id="timeintro" name="timeintro" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">惩奖金额：</label>
                    <div class="col-sm-8">
                        <input id="summoney" name="summoney" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">备注：</label>
                    <div class="col-sm-8">
                        <input id="remark1" name="remark1" class="form-control"  type="text"/>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>


<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>

<script th:inline="javascript">

    var prefix = ctx + "bgInfo/punReward";

    $(function () {
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-1',
                type: 'date'
            });
        });
    });


    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-punreward-add").serializeArray();
            $.operate.save(prefix + "/add", data);
        }
    }
    function getEmp() {
        $.modal.open("选择添加惩奖经历人员", ctx + "bgInfo/getEmp");
    }
</script>
</body>
</html>
